package org.agle4j.framework.utils;

import java.util.Collection;
import java.util.Map;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;

/**
 * 集合工具类
 * @author hanyx
 *
 */
public final class CollectionUtil {

	/**
	 * 判断 Collection 是否为空
	 */
	public static boolean isEmpty(Collection<?> collection) {
		return CollectionUtils.isEmpty(collection) ;
	}
	
	/**
	 * 判断 Collection 是否非空
	 */
	public static boolean isNotEmpty(Collection<?> collection) {
		return CollectionUtils.isNotEmpty(collection) ;
	}
	
	/**
	 * 判断 Map 是否为空
	 */
	public static boolean isEmpty(Map<?, ?> map) {
		return MapUtils.isEmpty(map) ;
	}
	
	/**
	 * 判断 Map 是否非空
	 */
	public static boolean isNotEmpty(Map<?, ?> map) {
		return MapUtils.isNotEmpty(map) ;
	}
}
